<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-1.12.4.min.js"></script>
    <style>
        .red{
            color: rebeccapurple;
        }
        .big{
            font-size: 30px;
        }
        .noline{
            text-decoration: none;
        }
    </style>
    <script>
        $(function () {
            var $div = $('#div01');
            var $a = $('#link01')

            // 读取样式属性值
            var colo= $div.css('color');
            alert(colo);

           // 写样式属性
           $div.css('color', 'red');

           // 操作样式类名
            $a.addClass('red');
            $a.addClass('big');
            $a.addClass('noline');
        })
    </script>
</head>
<body>
    <div id="div01">这是一个div</div>
    <div> hshsh</div>
    <a href="#" id="link01">ssssss</a>
</body>
</html>